FileOpen function

Syntax
FileOpen path-to-file

Description
Opens a file’s data fork for future reading or writing and returns a reference number for the opened file. All other FileIO commands and functions use the file’s reference number to access the open file. The file remains open until it is closed using FileClose.

Examples
Variable theFile, theData, refNum
theFile = (FindFolder "desk") & "FileIO Demo"
File(theFile).Text = "This is some text in the FileIO Demo file."
refNum = FileOpen theFile
theData = FileRead refNum, "all"
FileClose refNum
Message theData

See Also
Using the FileIO extension (page 136)

Author Info
FileOpen, part of FileIO Extension
Copyright © 1998 Life OnLine Software (lr). All rights reserved.